home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4115 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  888 b 

  1. Path: news.microsoft.com!news
  2. From: a-cnadc@microsoft.com (Dann Corbit)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Fastest way to computer log(base2) of x?
  5. Date: 1 Feb 1996 18:12:49 GMT
  6. Organization: Microsoft Corporation
  7. Message-ID: <4eqvr1$7tn@news.microsoft.com>
  8. References: <4e61iu$p6e@villa.fc.net> <4e6p7t$1n72@cymbal.aix.calpoly.edu> <4e8r54$n8q@ns.RezoNet.NET>,<4e9bl4$3ccp@cymbal.aix.calpoly.edu> <DM0AKu.A2H@news.cern.ch>
  9. NNTP-Posting-Host: 157.57.171.202
  10. Mime-Version: 1.0
  11. X-Newsreader: WinVN 0.93.14
  12.  
  13. Just a note that none of theses methods really find the base 2
  14. log of a number unless the number is a power of 2.  It is only
  15. a crude approximation of the log most of the time.  You are 
  16. finding the highest bit, that is all.  NOT the log base 2.
  17. -- 
  18. The opinions expressed in this message are my own personal views 
  19. and do not reflect the official views of Microsoft Corporation.
  20.  
  21.